Blog

Tip of the Week: View Helpers

Brad Wood November 09, 2012

Spread the word

Brad Wood

November 09, 2012

Spread the word


Share your thoughts

 

Have you ever had an ad-hoc helper UDF that you needed in your view?  Perhaps it was too localized to put in your global UDF Library, but you didn't want to clutter up your actual view with the logic.   That's what View Helpers are here for.  
 
They're incredibly simple and driven by good-old conventions.  If you have a view file called products.cfm, simply create a file in the same folder called productsHelper.cfm.  That "helper" file will automatically be included along with your view by the ColdBox framework.  You can place one-off formatting functions, or dynamic JS/CSS in these files, but please-- no business logic.
 
 
P.S. You can create a helper file that will be included for all the views in a folder.  If you had a folder of views called "orders", then you would simply create the file "/views/orders/ordersHelper.cfm".  See the pattern?
 

Add Your Comment

(2)

Nov 09, 2012 13:38:39 UTC

by Dan Fredericks

Is this a feature in 3.0+, or was it added earlier?

Nov 09, 2012 15:20:09 UTC

by Luis Majano

Hi Dan,

this feature was added in 3.0 and beyond

Recent Entries

Ortus Solutions and BoxLang at CFCamp 2026: Platinum Sponsor, Keynote Leaders, and a Full Lineup of Innovation

Ortus Solutions and BoxLang at CFCamp 2026: Platinum Sponsor, Keynote Leaders, and a Full Lineup of Innovation

CFCamp 2026 was an important milestone for the Ortus Solutions team and for the growing BoxLang ecosystem.

This year, Ortus Solutions participated as a Platinum Sponsor and had the honor of leading the official Keynote, where Luis Majano, Brad Wood, and Jacob Beers shared major updates around ColdBox, BoxLang, AI, and multi-runtime support.

The message was clear: the CFML ecosystem is not standing still. With BoxLang, ColdBox, C...

Cristobal Escobar
Cristobal Escobar
July 02, 2026
Into the Box 2026 Presentation Slides Are Now Available

Into the Box 2026 Presentation Slides Are Now Available

One of the best parts of Into the Box is that the learning doesn't end when the conference does.

We're excited to share that all official Into the Box 2026 presentation slides are now publicly available. Whether you attended the conference and want to revisit your favorite sessions or you're exploring the content for the first time, you can now browse the complete collection of presentation decks.

Victor Campos
Victor Campos
June 30, 2026